# PetscGetDate
Gets the current date. 
## Synopsis
```
PetscErrorCode PetscGetDate(char date[], size_t len)
```
Not collective


## Input Parameter

- ***len -*** length of string to hold date



## Output Parameter

- ***date -*** the date





## Note
This function makes a system call and thus SHOULD NOT be called from an error handler.


## Developer Note
This function is called once during `PetscInitialize()`.
It stashes the timestamp, and uses it when needed. This is so that
error handlers may report the date without generating possible
additional system errors during the call to get the date.


## Level
beginner

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/sys/time/fdate.c.html#PetscGetDate">src/sys/time/fdate.c</A>

## Examples
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/snes/tutorials/ex30.c.html">src/snes/tutorials/ex30.c.html</A><BR>


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/sys/time/fdate.c)


[Index of all Sys routines](index.md)  
[Table of Contents for all manual pages](/docs/manualpages/index.md)  
[Index of all manual pages](/docs/manualpages/singleindex.md)  
